A current mirror is a well-known circuit designed to copy a current through one active device (such as a transistor) by controlling the current in another active device, keeping the output current constant regardless of loading. The output current may be applied to a different node than the input current, and has a current ratio (with respect to the reference current) set by the ratio of input and output transistors used.
The transistor size ratio, and hence the current ratio, may be altered by connecting a plurality of output transistors in parallel. By adding switches in series with the parallel-connected output transistors, the number of output transistors active in the current mirror at any given moment can be changed by controlling the switches, and in this manner the current ratio can be dynamically controlled. When the switches are controlled by digital signals, the analog output current can be digitally controlled, acting like a Digital to Analog Converter (DAC).
FIG. 1 depicts a current mirror in which the active devices are NMOS transistors M1 and M2. Due to R1, current I1 flows through the reference transistor M1, causing a gate-source voltage Vgs1. The gate-source voltage Vgs2 for output NMOS transistor M2 is the same (Vgs1=Vgs2), resulting in current I2 when the transistor M4, acting as a switch, is in a conducting state. This occurs when the switch S1 is in the upper position, placing a high voltage on the gate of M4. Transistor M3 in series with reference transistor M1 also acts as a switch, which is always “on,” as its gate terminal is tied high. When switch S1 is in the lower position, switch M4 is non-conducting, or open, causing current I2 to go to zero. Accordingly, the switch S1 controls current I2 to be either proportional to I1 or zero.
Currents I1 and I2 are nearly equal when the reference transistor M1 and output transistor M2 have equal layout, and switching transistors M3 and M4 are also the same (indeed, M3 exists only for such path matching, as it is always in an “on” state), and of course R1=R2. In this case, if S1 switches to apply a pulse train on the gate of M4 having a 50% duty cycle, the current ratio I2/I1 is one half (½). Both the frequency and the pulse-width of the switching signal applied to the gate of M4 will influence this current ratio. Switching speed and pulse-width are influenced by product junction temperature and by production process spread, which cause an unacceptably large spread on the output current I2. Some of this spread can be compensated by a feedback system. However, measuring a high-frequency switching signal has limited accuracy, limiting the performance of such a feedback system.